package de.baumann.browser.utils

object ActiveUtil {

    private const val END_TIME = 1578499199000

    /*******************超级节点**************************/
    fun putSuperNodeStatus(isClose: Boolean) {
        put("superNodeIsClose", isClose)
    }

    fun superNodeIsClose(): Boolean {
        val isClose = getBoolean("superNodeIsClose")
        if (isClose) {
            return true
        }
        val currentTime = System.currentTimeMillis()
        if (currentTime >= END_TIME) {
            return true
        }
        return false
    }

    /*******************成长计划**************************/
    fun blackCardIsOpen(): Boolean {
        return getBoolean("blackCardIdOpen")
    }

    fun putBlackCardStatus(isOpen: Boolean) {
        put("blackCardIdOpen", isOpen)
    }

    /*******************矿池**************************/
    fun poolIsOpen(): Boolean {

        if (!isLogined()) {
            return false
        }
        return getBoolean("poolIsOpen")
    }

    fun putPoolStatus(isOpen:Boolean){
        put("poolIsOpen", isOpen)
    }
}